package com.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

//TableName得和数据库表的名字一样
@TableName("staff")
//@Data注解 简化get和set方法
@Data
public class Staff {
    @TableId(value = "id",type = IdType.AUTO)  //实现自增;如果主键名不是id,则需要补充:value='userId'
    private Integer id;
    private String staffName;
    private String password;
    private String nickName;
    private Integer age;
    private String gender;
    private String userType;
    private String phone;
    private String email;
    private String address;
    private String accountState;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date updateTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }
}

